package cn.huiyunche.base.service.form;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @FileName: cn.huiyunche.base.service.form
 * @Description: 劳务价格表单
 * @author: Felix
 * @date: 2017/3/13 下午2:33
 */
public class ScPriceconfFreightVlidateLogForm {

    private Integer id;

    @NotBlank(message = "线路名称不能为空！")
    @Length(min = 3, max = 100, message = "线路名称 3 到 50个字!")
    private String routeName;

    @NotBlank(message = "起始省份名称不能为空！")
    @Length(min = 3, max = 100, message = "起始省份名称 3 到 50个字!")
    private String originProvinceName;

    @NotBlank(message = "起始区域名称不能为空！")
    @Length(min = 3, max = 100, message = "起始区域名称 3 到 50个字!")
    private String originAreaName;

    @NotBlank(message = "目的省份名称不能为空！")
    @Length(min = 3, max = 100, message = "目的省份名称 3 到 50个字!")
    private String destProvinceName;

    @NotBlank(message = "目的区域名称不能为空！")
    @Length(min = 3, max = 100, message = "目的区域名称 3 到 50个字!")
    private String destAreaName;

    @NotNull(message = "请输入线路里程")
    @DecimalMin(value = "0.01", message = "里程必须大于0.01公里")
    @DecimalMax(value = "10000", message = "里程必须小于10000公里")
    private BigDecimal miles;

    @NotNull(message = "请输入单价")
    @DecimalMin(value = "0.01", message = "单价必须大于0.01元")
    @DecimalMax(value = "10000", message = "单价必须小于10000元")
    private BigDecimal currentValue;

    @NotNull(message = "请输入生效时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveDate;

    private String batchId;

    private Date invalidDate;

    private Date gmtCreate;

    private Date gmtUpdate;

    private String creator;

    public Integer getId() {
        return id;
    }

    public ScPriceconfFreightVlidateLogForm setId(Integer id) {
        this.id = id;
        return this;
    }
    public String getRouteName() {
        return routeName;
    }

    public ScPriceconfFreightVlidateLogForm setRouteName(String routeName) {
        this.routeName = routeName;
        return this;
    }

    public String getBatchId() {
        return batchId;
    }

    public ScPriceconfFreightVlidateLogForm setBatchId(String batchId) {
        this.batchId = batchId;
        return this;
    }

    public BigDecimal getCurrentValue() {
        return currentValue;
    }

    public ScPriceconfFreightVlidateLogForm setCurrentValue(BigDecimal currentValue) {
        this.currentValue = currentValue;
        return this;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public ScPriceconfFreightVlidateLogForm setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
        return this;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public ScPriceconfFreightVlidateLogForm setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
        return this;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public ScPriceconfFreightVlidateLogForm setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public Date getGmtUpdate() {
        return gmtUpdate;
    }

    public ScPriceconfFreightVlidateLogForm setGmtUpdate(Date gmtUpdate) {
        this.gmtUpdate = gmtUpdate;
        return this;
    }

    public String getCreator() {
        return creator;
    }

    public ScPriceconfFreightVlidateLogForm setCreator(String creator) {
        this.creator = creator;
        return this;
    }

    public String getOriginProvinceName() {
        return originProvinceName;
    }

    public ScPriceconfFreightVlidateLogForm setOriginProvinceName(String originProvinceName) {
        this.originProvinceName = originProvinceName;
        return this;
    }

    public String getOriginAreaName() {
        return originAreaName;
    }

    public ScPriceconfFreightVlidateLogForm setOriginAreaName(String originAreaName) {
        this.originAreaName = originAreaName;
        return this;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public ScPriceconfFreightVlidateLogForm setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
        return this;
    }

    public String getDestAreaName() {
        return destAreaName;
    }

    public ScPriceconfFreightVlidateLogForm setDestAreaName(String destAreaName) {
        this.destAreaName = destAreaName;
        return this;
    }

    public BigDecimal getMiles() {
        return miles;
    }

    public ScPriceconfFreightVlidateLogForm setMiles(BigDecimal miles) {
        this.miles = miles;
        return this;
    }

    @Override
    public String toString() {
        return "ScPriceconfFreightForm{" +

                "id=" + id +
                ", routeName=" + routeName +
                ", originProvinceName=" + originProvinceName +
                ", originAreaName=" + originAreaName +
                ", destProvinceName=" + destProvinceName +
                ", destAreaName=" + destAreaName +
                ", miles=" + miles +
                ", currentValue=" + currentValue +
                ", effectiveDate=" + effectiveDate +
                ", invalidDate=" + invalidDate +
                ", gmtCreate=" + gmtCreate +
                ", gmtUpdate=" + gmtUpdate +
                ", creator='" + creator + '\'' +
                '}';
    }
}
